<%@ page import="java.util.List"%>
<%@ page import="domain.model.group.Group"%>
<%@ page import="domain.model.user.User"%>

<h2>${title}</h2>

<div id="queryContents">

	<p>Are you sure you want to remove this group??</p>


	<table border="1" style="border-collapse: collapse;">
		<tr>
			<th>Members</th>
		</tr>

		<%
		List<User> members = (List<User>)request.getAttribute("memberList");
		long grid = (Long)request.getAttribute("groupId");
		long grver = (Long)request.getAttribute("groupId");
		
		if(members.isEmpty())
		{
		%>

		<h2>There are no members to remove</h2>

		<%
			
		}
		
		for(User u: members)
		{
		%>

		<tr>
			<td><%=u.getFirstName()%> <%=u.getLastName()%></td>
		</tr>

		<%
		}
	%>

		<td id="btn_<%=grid%>">

			<button onclick="removeGroup(<%=grid%>,<%=grver%>);">Remove</button>
		</td>


	</table>
</div>
<!--closing queryContents -->
